package cau2;

import java.awt.Container;
import java.awt.Font;
import java.lang.reflect.Field;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

public class DangNhapMayChu extends JFrame {
	public DangNhapMayChu() {
		try {
			setDefaultCloseOperation(EXIT_ON_CLOSE);
			initComponent();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	private void initComponent(){
		Container c = getContentPane();
		this.setTitle("Dang Nhap May Chu");
		this.setSize(600, 500);
		
		JLabel lbtitle = new JLabel();
		lbtitle.setText("Dang Nhap May Chu");
		lbtitle.setSize(250, 30);
		lbtitle.setFont(new Font("Arial", Font.BOLD, 25));
		lbtitle.setLocation(170, 100);
		
		JLabel lbtmc = new JLabel();
		lbtmc.setText("Ten May Chu:");
		lbtmc.setSize(150, 30);
		lbtmc.setLocation(90, 150);
		
		JTextField f1 = new JTextField();
		f1.setText("ThienVD-PC");
		f1.setSize(300, 30);
		f1.setLocation(180, 150);
		
		JLabel lbcsdl = new JLabel();
		lbcsdl.setText("CSDL:");
		lbcsdl.setSize(70, 30);
		lbcsdl.setLocation(90, 190);
		
		JTextField f2 = new JTextField();
		f2.setText("MEDICALSTORE");
		f2.setSize(300, 30);
		f2.setLocation(180, 190);
		
		JLabel lbdn = new JLabel();
		lbdn.setText("Dang Nhap:");
		lbdn.setSize(140, 30);
		lbdn.setLocation(90, 230);
		
		JTextField f3 = new JTextField();
		f3.setText("sa");
		f3.setSize(300, 30);
		f3.setLocation(180, 230);
		
		JLabel lbmk = new JLabel();
		lbmk.setText("CSDL:");
		lbmk.setSize(130, 30);
		lbmk.setLocation(90, 270);
		
		JPasswordField f4 = new JPasswordField();
		f4.setText("123456");
		f4.setSize(300, 30);
		f4.setLocation(180, 270);
		
		JButton but1 = new JButton();
		but1.setText("Dong Y");
		but1.setSize(100, 30);
		but1.setLocation(180, 350);
		
		JButton but2 = new JButton();
		but2.setText("Huy Bo");
		but2.setSize(100, 30);
		but2.setLocation(310, 350);		
		
		c.add(lbtitle);
		c.add(lbtmc);
		c.add(f1);
		c.add(lbcsdl);
		c.add(f2);
		c.add(lbdn);
		c.add(f3);
		c.add(lbmk);
		c.add(f4);
		c.add(but1);
		c.add(but2);
		
		
		
		
		this.setLayout(null);
		this.setVisible(true);
		
	}
}
